# 仓库地址
kafka_zookeeper_repos_dir="/leaper/base_service/kafka_zookeeper"

# 确保目录存在
kafka_data_dir="/leaper/base_service/kafka_zookeeper/data/kafka/data"
mkdir -p $kafka_data_dir
sudo chown -R 1001:1001 $kafka_data_dir

# 删除老版本容器
kafka_zookeeper_pre_repos_dir=${kafka_zookeeper_repos_dir}
docker compose -f $kafka_zookeeper_pre_repos_dir/docker-compose.yml stop
docker compose -f $kafka_zookeeper_pre_repos_dir/docker-compose.yml rm -f

# 启动新版本容器
docker compose up -d
